package com.lcc.codehelper.controller;

import com.lcc.codehelper.mapper.TableMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author lincc
 * @version 1.0  2019/3/27
 */
@RestController
@RequestMapping("/api/generator/table")
public class TableController {
    @Resource
    TableMapper tableDao;

    @GetMapping("/columns")
    public List<Map> info(String tableName) {
        return tableDao.listTable(tableName);
    }

}
